Skip to main content

Install Fluent Java RESTful Engine With Docker CLI

As of version 23.2+ we began offering a Fluent Java RESTful Docker image. This should eliminate time spent setting up our Java RESTful engine and allow you to start processing your templates in no time with ease! This article will outline the steps you need to make use of our Docker image using the Docker CLI.

Requirements

Setup Steps

Step 1: Pulling the Fluent Docker Image

To pull the Docker image, you need to run the following command in your command line

docker pull public.ecr.aws/apryse/fluent-restful:{VERSION}

Where version is the latest version of the Java RESTful engine specified here

To verify that the image was pulled successfully, run the command:

docker image ls

This will list out the images on your machine, and you should see the image public.ecr.aws/apryse/fluent-restful in there.

Make sure to save the Image ID of the image you just pulled, as you will need it in the next step.

Step 2: Running a Container Using the Fluent Docker Image

The next step is to run a container using the image you just pulled. To do this, run the following command:

docker run -d -p [PORT_ON_BROWSER]:[PORT_ON_CONTAINER] -e VAR=VALUE --name [CONTAINER_NAME] [IMAGE_ID]
  • -d: This flag runs the container in the background.
  • -p: This flag maps the port on the container to the port on the browser.
  • -e: This flag sets an environment variable in the container.
    • This is where you will set your license key and other Fluent properties.
  • --name: This flag sets the name of the container.
tip

There are many more arguments you can use with docker run. Here is a link to the Docker Run Documentation.

Here is an example command using the docker image id from the previous step and setting the license key as an environment variable:

docker run -d -p 8080:8080 -e license={YOUR_LICENSE_KEY} --name FluentRESTfulEngine 86f0d18c07a7

Step 3: Verify the Container is Running

To verify the container is running run the command

docker ps

This will list out the running containers on your machine. You should see the container you just started in the list.

Thats it! You now have a running Fluent Java RESTful engine in a Docker container. You can now start processing your templates using the RESTful API.